Skip to main content

Image formating

The image format is crucial for the performance of the app in which it is used. Image formats utilize compression techniques to decrease file size, simplifying the storage and transmission of images without occupying excessive storage space. Therefore, selecting the optimal image format for your application becomes highly important.

PerceptPixel allows you to transform your images to best suited format you want.

Original Image
example
URL - https://img.perceptpixel.com/demo-brjexrkh/example-1.jpeg

Image Format type conversion

You can set the type of the format of the image.

Syntax

  • f_<type> - Using the format type value for f (format) sets the image format to newly assigned format. For example, f_png converts the image to PNG. Below are the formats supported by PerceptPixel

    • png - Converts the image to PNG. It is the most frequently used uncompressed raster image format on the internet.
    • jpeg - Converts the image to JPEG. A JPEG file supports up to 24-bit color and uses lossy compression to compress images for more convenient storage and sending.
    • webp - Converts the image to WebP. WepP is modern image format that provides superior lossless and lossy compression for images on the web
  • Using a format name with f_ prefix would change the format of the image as needed. For example - f_png, f_jpeg, f_webp

  • Auto selecting the best suited format compatible with your browser by using f_auto

1. Set Image type to Webp

Converting JPEG Image to Webp Image
example
https://img.perceptpixel.com/demo-brjexrkh/f_webp/example-1.jpeg

2. Auto select Image type

Selecting best suitable format compatible with browser
example
https://img.perceptpixel.com/demo-brjexrkh/f_auto/example-1.jpeg